﻿@model GameSchool.Models.Common.Notification

@{
    ViewBag.Title = "Búa til tilkynningu";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Búa til tilkynningu</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Tilkynning</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Course)
        </div>
        <div class="editor-field">
			@Html.DropDownListFor(model => model.CourseId, (IEnumerable<SelectListItem>) ViewData["CoursesWhereITeach"],"*Allir*")
            @Html.ValidationMessageFor(model => model.Course)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NotificationMessage)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.NotificationMessage, new { rows = "10", cols = "40" })
            @Html.ValidationMessageFor(model => model.NotificationMessage)
        </div>
		
		<p>
            <input type="submit" value="Skrá" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Aftur í lista", "IndexNotification")
</div>
